package avicit.bdp.dms.tdm.dao;

import avicit.bdp.common.base.BaseDAO;
import avicit.bdp.dms.tdm.dto.ProcessApproveDTO;
import avicit.platform6.api.bpm.dto.HistoryTaskVo;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @金航数码科技有限责任公司
 * @作者：${tableInfo.classCreator}
 * @邮箱：${tableInfo.classMailbox}
 * @创建时间： 2023-11-14 16:03
 * @类说明：bdp_process_approve
 * @修改记录：
 */
@Repository
public interface ProcessApproveDao extends BaseDAO<ProcessApproveDTO> {

    /**
     * 我的审核-按条件分页查询
     *
     * @return 分页列表
     */
    Page<ProcessApproveDTO> getMyProcessPageList(@Param("businessTitle") String businessTitle,
                                                 @Param("flowType") Integer flowType,
                                                 @Param("bpmType") String bpmType,
                                                 @Param("bpmState") String bpmState,
                                                 @Param("loginUserId") String loginUserId,
                                                 @Param("loginUserName") String loginUserName);

    /**
     * 我的申请-按条件分页查询
     *
     * @return 分页列表
     */
    Page<ProcessApproveDTO> getMyApplyPageList(@Param("keyWord") String keyWord,
                                               @Param("resourceType") Integer resourceType,
                                               @Param("applyTimeBegin") String applyTimeBegin,
                                               @Param("applyTimeEnd") String applyTimeEnd,
                                               @Param("bpmType") String bpmType,
                                               @Param("bpmState") String bpmState,
                                               @Param("loginUserId") String loginUserId,
                                               @Param("loginUserName") String loginUserName);

    List<ProcessApproveDTO> queryProcessApproveByBusinessIdList(@Param("idLists") List<String> idLists);

    ProcessApproveDTO getMyProcessApproveByUserId(@Param("userId") String userId, @Param("businessId") String businessId, @Param("flowType") Integer flowType);

    HistoryTaskVo getMyToDoTaskByUserId(@Param("businessId") String businessId, @Param("userId") String userId);
}